﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Frame.Lib.Data;

namespace Cms.Entity.Job
{
    public partial class JobInfo : EntityBase
    {
        public override string GetTableName()
        {
            return "c_Job";
        }
        public override string GetInsertSql()
        {
            return "insert into c_Job ( [ID], [Name], [WorkPlace], [Salary], [Gender], [Age], [Profession], [ContactName], [Telephone], [Email], [ExpireDate], [Description], [InputTime], [Orders], [TypeCode], [TypeName], [PositionCount]) values ( @ID, @Name, @WorkPlace, @Salary, @Gender, @Age, @Profession, @ContactName, @Telephone, @Email, @ExpireDate, @Description, @InputTime, @Orders, @TypeCode, @TypeName, @PositionCount)";
        }
        public override string GetUpdateSql()
        {
            return "update c_Job set  [Name] = @Name, [WorkPlace] = @WorkPlace, [Salary] = @Salary, [Gender] = @Gender, [Age] = @Age, [Profession] = @Profession, [ContactName] = @ContactName, [Telephone] = @Telephone, [Email] = @Email, [ExpireDate] = @ExpireDate, [Description] = @Description, [InputTime] = @InputTime, [Orders] = @Orders, [TypeCode] = @TypeCode, [TypeName] = @TypeName, [PositionCount] = @PositionCount where ID = @ID";
        }
        /// <summary>
        /// PK
        /// </summary>
        public Int32 ID
        {
            get;
            set;
        }
        /// <summary>
        /// 职位
        /// </summary>
        public String Name
        {
            get;
            set;
        }
        /// <summary>
        /// 工作地点
        /// </summary>
        public String WorkPlace
        {
            get;
            set;
        }
        /// <summary>
        /// 薪资要求
        /// </summary>
        public String Salary
        {
            get;
            set;
        }
        /// <summary>
        /// 性别（男，女，不限）
        /// </summary>
        public Int32 Gender
        {
            get;
            set;
        }
        /// <summary>
        /// 年龄
        /// </summary>
        public String Age
        {
            get;
            set;
        }
        /// <summary>
        /// 专业
        /// </summary>
        public String Profession
        {
            get;
            set;
        }
        /// <summary>
        /// 联系人
        /// </summary>
        public String ContactName
        {
            get;
            set;
        }
        /// <summary>
        /// 电话
        /// </summary>
        public String Telephone
        {
            get;
            set;
        }
        /// <summary>
        /// 邮件
        /// </summary>
        public String Email
        {
            get;
            set;
        }
        /// <summary>
        /// 过期日期
        /// </summary>
        public String ExpireDate
        {
            get;
            set;
        }
        /// <summary>
        /// 描述
        /// </summary>
        public String Description
        {
            get;
            set;
        }
        /// <summary>
        /// 发布时间
        /// </summary>
        public DateTime InputTime
        {
            get;
            set;
        }
        /// <summary>
        /// 排序
        /// </summary>
        public Int32 Orders
        {
            get;
            set;
        }
        /// <summary>
        /// 工作类型
        /// </summary>
        public Int32 TypeCode
        {
            get;
            set;
        }
        /// <summary>
        /// 工作类型名称
        /// </summary>
        public String TypeName
        {
            get;
            set;
        }
        /// <summary>
        /// 职位个数
        /// </summary>
        public Int32 PositionCount
        {
            get;
            set;
        }
        public override void SetValue(string key, object value)
        {
            key = key.ToLower();
            switch (key)
            {
                case "id":
                    this.ID = (Int32)value;
                    break;
                case "name":
                    this.Name = (String)value;
                    break;
                case "workplace":
                    this.WorkPlace = (String)value;
                    break;
                case "salary":
                    this.Salary = (String)value;
                    break;
                case "gender":
                    this.Gender = (Int32)value;
                    break;
                case "age":
                    this.Age = (String)value;
                    break;
                case "profession":
                    this.Profession = (String)value;
                    break;
                case "contactname":
                    this.ContactName = (String)value;
                    break;
                case "telephone":
                    this.Telephone = (String)value;
                    break;
                case "email":
                    this.Email = (String)value;
                    break;
                case "expiredate":
                    this.ExpireDate = (String)value;
                    break;
                case "description":
                    this.Description = (String)value;
                    break;
                case "inputtime":
                    this.InputTime = (DateTime)value;
                    break;
                case "orders":
                    this.Orders = (Int32)value;
                    break;
                case "typecode":
                    this.TypeCode = (Int32)value;
                    break;
                case "typename":
                    this.TypeName = (String)value;
                    break;
                case "positioncount":
                    this.PositionCount = (Int32)value;
                    break;
            }
        }
        public override object GetValue(string key)
        {
            key = key.ToLower();
            switch (key)
            {
                case "id":
                    return this.ID;
                case "name":
                    return this.Name;
                case "workplace":
                    return this.WorkPlace;
                case "salary":
                    return this.Salary;
                case "gender":
                    return this.Gender;
                case "age":
                    return this.Age;
                case "profession":
                    return this.Profession;
                case "contactname":
                    return this.ContactName;
                case "telephone":
                    return this.Telephone;
                case "email":
                    return this.Email;
                case "expiredate":
                    return this.ExpireDate;
                case "description":
                    return this.Description;
                case "inputtime":
                    return this.InputTime;
                case "orders":
                    return this.Orders;
                case "typecode":
                    return this.TypeCode;
                case "typename":
                    return this.TypeName;
                case "positioncount":
                    return this.PositionCount;
                default:
                    return null;
            }
        }
    }

}
